include(${PROJECT_SOURCE_DIR}/CMake/FindPhysX.cmake)

if(PHYSX_FOUND)
if(UNIX)
	set(CMAKE_CXX_FLAGS "-DLINUX -DPHYSX")
endif(UNIX)
endif(PHYSX_FOUND)

set(SOURCES main.cpp)                                #tutaj można dodać nowe pliki źródłowe
find_package(SDL REQUIRED)
find_package(OpenGL REQUIRED)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)        #można zmienić na ${CMAKE_SOURCE_DIR}, żeby binarki lądowały w głównym katalogu kodu
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)           #nie ma to znaczenia przy Visual Studio

include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${OPENGL_INCLUDE_DIR})
include_directories(${SDL_INCLUDE_DIR})
include_directories(${PHYSX_INCLUDE_DIR})

link_directories(${PROJECT_SOURCE_DIR}/lib)
link_directories(${LIBRARY_OUTPUT_PATH})

add_executable(template ${SOURCES})
target_link_libraries(template WIN32 ${SDL_LIBRARY} ${OPENGL_LIBRARIES} ${PHYSX_LIBRARIES})    #tutaj należy dodawać nowe biblioteki do dolinkowania
